<template>
	<view class="search-container" :style="{'background-color':bgcolor}">
		<view class="search-box" :style="{'border-radius':radius+'px'}" @click="searchBoxHandler">
			<uni-icons type="search" size="15" class="icon"></uni-icons>
			<text class="placeholder">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
			
		props:{
			bgcolor:{
				type:String,
				default:"#008000"
			},
			radius:{
				type:Number,
				default:20
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			searchBoxHandler(){
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
	.search-container{
		height: 100rpx;
		width: 750rpx;
		display: flex;
		justify-content: center;
		.search-box{
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 15px;
			background-color: white;
			width: 90%;
			height: 70%;
		}
	}
</style>